﻿using System;
using System.Windows.Forms;
using ToolKitManagerIESiteList.Provider;

namespace ToolKitManagerIESiteList
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            PortableSettingsProvider.DefaultFolderlSettings =
                System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),
                Properties.Resources.FolderAppSettings);
            if (!System.IO.Directory.Exists(PortableSettingsProvider.DefaultFolderlSettings))
            {
                System.IO.Directory.CreateDirectory(PortableSettingsProvider.DefaultFolderlSettings);
            }
            //overwrite user setting - force create custom setting file provider
            Properties.Settings.Default.UpdateVersion = !Properties.Settings.Default.UpdateVersion;
            Properties.Settings.Default.Save();
            Properties.Settings.Default.UpdateVersion = !Properties.Settings.Default.UpdateVersion;
            Properties.Settings.Default.Save();
            Application.Run(new FrmMain());
        }
    }
}
